<p>Total feedback: <%= @feedbacks.length %>, <%= @feedbacks.select {|f| !f.read }.length %> of which are unread.  Current time: <%= Time.now %>.</p>
<% form_tag '/admin/feedbacks/delete' do %>
  <table>
    <tr>
      <th>From</th>
      <th>Subject</th>
      <th>Sent</th>
      <th>Delete?</th>
    </tr>
  <% @feedbacks.each do |f| %>
    <tr style="<% unless f.read %>font-weight:bold<% end %>">
      <td>
        <%= mail_to f.from_email, f.from_name %>
      </td>
      <td>
        <%= link_to f.subject.empty? ? "&lt;No subject&gt;" : f.subject, [:admin, f] %>
      </td>
      <td>
        <%= f.created_at %>
      </td>
      <td>
        <%= check_box_tag("delete_list[" + f.id.to_s + "]")%>
      </td>
    </tr>
  <% end %>
  </table>
  <%= submit_tag "Delete all checked feedback", :onclick => "return confirm('Are you sure you want to delete these?  It cannot be undone!')" %>
<% end %>